package com.tj.collection.controller.admin.request;


import com.fqgj.common.api.ParamsObject;
import com.fqgj.exception.common.ApiIllegalArgumentException;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2016/11/18
 * Time: 上午10:30
 */
public class AdminStatusVo extends ParamsObject {

    private Long adminId;

    private Integer adminStatus;

    public Long getAdminId() {
        return adminId;
    }

    public AdminStatusVo setAdminId(Long adminId) {
        this.adminId = adminId;
        return this;
    }

    public Integer getAdminStatus() {
        return adminStatus;
    }

    public AdminStatusVo setAdminStatus(Integer adminStatus) {
        this.adminStatus = adminStatus;
        return this;
    }

    @Override
    public void validate() {
        if (adminId < 1) {
            throw new ApiIllegalArgumentException("管理员ID不能为空");
        }
        if (adminStatus < 0) {
            throw new ApiIllegalArgumentException("状态不能为空");
        }
    }
}
